package com.rookie.im.core;

import com.rookie.im.core.config.ConfigLoader;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.representer.Representer;

import com.rookie.im.core.config.AppConfig;
import com.rookie.im.core.server.ImServer;
import com.rookie.im.core.server.utils.RabbitManager;
import com.rookie.im.core.server.utils.RedisManager;

public class Starter {
	public static void main(String[] args) {
        AppConfig config = ConfigLoader.settings("application.yaml", "application.properties");
        new Thread(() -> {
            new ImServer(config.getRookie()).run();
        }).start();
        RedisManager.init(config.getRookie().getRedis());
		RabbitManager.init(config.getRookie().getRabbitmq());
	}
}
